function tipShow(){
	$('.tip').animate({
		'opacity' : '0.8'
	},1000,function(){
		$('.tip').animate({
			'opacity' : '0'
		},2000);
	})
}
$('.type span').on('click',function(){
	$(this).addClass('checkedType').siblings().removeClass('checkedType');
	$('#eshopType').val($(this).html());
})
$('.submit').on('click',function(){
	var userName = $('.userName').val().replace(/(^\s+)|(\s+$)/g,"");
	var userPhone = $('.userPhone').val().replace(/(^\s+)|(\s+$)/g,"");
	var textAddress = $('#textAddress').val().replace(/(^\s+)|(\s+$)/g,"");
	if(Boolean(userName) && Boolean(userPhone)){
		if(Boolean(textAddress)){
			$('#textAddressValue').val(textAddress);
		}
		$('form').submit();
	}else{
		tipShow();
	}
})
